<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>

<div id="main_powerrate_list" class="easyui-layout" fit="true">
    <div region="north" style="padding:0px;border:0px">
         <table style="width: 100%;" cellpadding="0" cellspacing="1"  border="0" class="formtable" align="center">
	       <tr height="40" >
				<td>
				    <label style="padding:2px;"> 班组  </label>
				    <select name="bzId" id="bzId" style="margin-left:5px;width:180px;" >
					         <option value="">请选择</option>	
					         <!-- 遍历班组-->			
			                 <c:forEach var="team" items="${teamLst }" >                      
					             <option value="${team.bzId }">${team.bzName }</option>
					         </c:forEach>
				    </select>
				   
				   <label style="padding:2px;"> 日期  </label>
				   <input class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" style="width: 180px;" id="cDate"
						       name="cDate" ignore="ignore" value="">
	                <a href="#" class="easyui-linkbutton"  plain="true" iconCls="icon-search"  style="margin-left:5px;" onclick="myquery();" >查 询</a>
	                <a href="#" class="easyui-linkbutton"  plain="true" iconCls="icon-cancel"  style="margin-left:5px;" onclick="myreset();" >清 空</a>
				</td>
				
			</tr>
		 </table>
	   </div>
    <div region="center" style="padding:0px;border:0px;">
        <t:datagrid name="powerateList" title="电费回收" actionUrl="homeController.do?powerRateGrid" idField="id" treegrid="false" pagination="true"  sortOrder="desc" sortName="cDate" onLoadSuccess="">
            <t:dgCol title="唯一标识" field="id"  width="30" hidden="true"></t:dgCol>
            <t:dgCol title="日期" field="cDate"  width="100" query="true"></t:dgCol>
            <t:dgCol title="班组名称" field="bzName" width="100" query="true"></t:dgCol>
            <t:dgCol title="累计欠费(万元)" field="arrearage" width="100"></t:dgCol>
            <t:dgCol title="累计回收率(%)" field="rateofrecovery" width="100"></t:dgCol>
            <t:dgCol title="common.operation" field="opt" width="50"></t:dgCol>
            <t:dgDelOpt url="homeController.do?delPowerRate&id={id}" title="删除"></t:dgDelOpt> 
            <t:dgToolBar title="新增" icon="icon-add" url="homeController.do?aouPowerRate" funname="add" height="430"></t:dgToolBar>
            <t:dgToolBar title="编辑" icon="icon-edit" url="homeController.do?aouPowerRate" funname="update" height="430"></t:dgToolBar>
        </t:datagrid>
    </div>
    
</div>

<script type="text/javascript">
    $(function() {
        
    });
    
    function myquery(){
		 //班组编号
	    var bzId = $('#bzId').val();
		 //日期
	    var cDate = $('#cDate').val();		
		
		$('#powerateList').datagrid({
			queryParams: {
				bzId: bzId,
				cDate: cDate
			}
		});

	}
    
    function myreset(){
		$('#bzId').val('');
		$('#cDate').val('');
	}
</script>
